package IAPractica1;

 
public class IAPrac1Pair implements Comparable<IAPrac1Pair> { 
 
 private int first;
 private int second;
 
 public IAPrac1Pair(){
 
 }

 public IAPrac1Pair(int x, int y) {
	
     this.first = x;
     this.second = y;
 }
 
 public int first() {
	
     return first;
 }
 
 
 public int second() {
	
     return second;
 }
 
 public void setfirst(int x) {		
     first = x;
 }
 
 
 public void setsecond(int x) {
     second = x;
 }
 
 public int compareTo(IAPrac1Pair that) {
 
     if      (this.first() < that.first()) return -1;
     else if (this.first() > that.first()) return +1;
     else                                    return  0;
 } 
 
}